#include "Infos.h"

FileInfo::FileInfo( int id )
: _id( id )
, _fileName( NULL )
, _fileNameExt( NULL )
, _size( 0 )
, _mtime( 0 ){}

FileInfo::FileInfo( const FileInfo& org )
: _fileName( NULL )
{
	*this = org;
}

FileInfo::~FileInfo()
{
	if( _fileName )
		free( _fileName );
}

FileInfo& FileInfo::operator= ( const FileInfo& org )
{
	if( this == &org ) return *this;
	_id = org._id;
	SetFileName( org._fileName );
	_attr = org._attr;
	_size = org._size;
	_mtime = org._mtime;
	_atime = org._atime;
	_crtime = org._crtime;
	_selected = org._selected;
	return *this;
}